home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1259 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.3 KB  |  53 lines

  1. Path: nntp.teleport.com!usenet
  2. From: Jeff Grossman <grossman@teleport.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: STL deque compile warning
  5. Date: 10 Jan 1996 04:23:51 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4cvf0n$jq@maureen.teleport.com>
  8. NNTP-Posting-Host: ip-pdx21-56.teleport.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.2N (Windows; I; 16bit)
  13.  
  14. Using MSVC4 (and the STL on MS's CD-ROM), this simple program,
  15.  
  16. #include <deque.h>
  17.  
  18. class foo
  19. {
  20.     int        n1;
  21.     int        n2;
  22. };
  23.  
  24. int main ()
  25. {
  26.     deque< foo >    dFoo;
  27.  
  28.     return 0;
  29. }
  30.  
  31.  
  32. generates the following warnings:
  33.  
  34. deque.h(106) : warning C4146: unary minus operator applied to
  35.                               unsigned type, result still unsigned
  36. deque.h(187) : warning C4146: unary minus operator applied to
  37.                               unsigned type, result still unsigned
  38. deque.h(455) : warning C4018: '>' : signed/unsigned mismatch
  39. deque.h(469) : warning C4018: '>' : signed/unsigned mismatch
  40.  
  41.  
  42. Does anyone know STL well enough to understand the significance of these
  43. warnings?
  44.  
  45. I've looked at the offending code, but I'm very new to STL, and I can't 
  46. tell if these warnings are indicative of a true problem or not.
  47.  
  48.  
  49. TIA,
  50. Jeff
  51.  
  52.  
  53.